home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11656 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.crystalball.com!news
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Determining the length of an int in string form
  5. Date: Mon, 25 Mar 1996 11:28:29 -0600
  6. Organization: crystalball.com
  7. Message-ID: <3156D7BD.90D@oc.com>
  8. References: <3146D058.DD7@cbm.com> <4i7uth$qph@inet-nntp-gw-1.us.oracle.com> <DoE38u.GIH@iquest.net> <4in1ga$ogk@airdmhor.gen.nz> <Pine.SOL.3.91.960319172332.4535A-100000@darwin.UCSC.EDU> <314F65D3.6A8@oc.com> <827703345snz@genesis.demon.co.uk> <3155E067.3261@iadfw.net> <827758089snz@genesis.demon.co.uk>
  9. NNTP-Posting-Host: external.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Lawrence Kirby wrote:
  16.  > 
  17.  > In article <3155E067.3261@iadfw.net> lfw@iadfw.net "Larry Weiss" writes:
  18.  > >Now what I'd really like to see in the next revision of the standard library
  19.  > >would be an snprintf() with the extra argument to declare only so many
  20.  > >writeable chars in the buffer, and a return code to indicate logical
  21.  > >attempts to write beyond that limit.
  22.  > 
  23.  > Indeed, a return value indicating how many characters would have been
  24.  > written to the buffer if it were large enough.
  25.  > 
  26.  
  27. That would be great!  That way you could specify zero chars available
  28. if you just wanted to learn how many to allocate ideally for the real event.
  29.  
  30. Do implementations of snprintf() exist today that could be held up
  31. as prior-art?
  32.